package com.kunpan.admin.mapper;

import com.kunpan.admin.entity.PanFile;
import com.kunpan.admin.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {

    public int insertUser(User user);
    public User selectUserInfoByEmail(String email);

    public Integer selectUserIdByEmail(String email);

    int updateUserInfo(User user);

    User selectUserById(Integer userId);

    int updateUserPwd(@Param("userId") Integer userId,@Param("password") String password);

    int updateUserSpace(@Param("userId") Integer userId, @Param("useSpace") Long useSpace);

    int updateUserAvatar(@Param("userId") Integer userId,@Param("avatar") String avatar);

    void updateUserSpaceByIds(List<PanFile> list);

    int updateUserPwdByEmail(@Param("email") String email,@Param("pwd") String pwd);
}
